MULTIPIK D&D Demo: DropSelItems Form1 DummyList System Picture1 wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww; wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww Command1 OKCancel System OKCancel &Cancel System iflag wMulPik IDL_MPICK Form_Load TRUE< Form_Paint hInst GetWindowWord MULTIPIK GWW_HINSTANCE Rect, GetWindowRect DummyListP GetFocus< Visible FALSEN GetSystemMetrics SM_CYCAPTION| nWidth right nHeight BOTTOM CreateWindowt LBS_MULTIPICK IDL_MPIK HideMe ShowWindow SendDlgItemMessage LB_ADDSTRING ShowMe OKCancel_Click Index Total LB_GETSELCOUNTW Count Choices LB_GETSELITEMS LB_GETTEXT Notice# Thanks Caption SW_HIDE SW_SHOWR DummyList_Click SendMessage Result LBS_EXTPICK Form_MouseMove Button Shift DestroyWindow GWW_ID OldhWndh Dir1_Change LB_RESETCONTENT LB_DIR NewSpec LBS_FILELIST Dir1_Click Command1_Click DropSelItems hList nButton Picture1_Click Picture1_MouseDown hRes< Feel free to use or modify MULTIPIK to suit your needss Address questions/comments/improvements tot Costas Kitsos, CIS ID: 73667,1755 Enjoy! Modified to demo drag 'n drop server capabilityy by Jonathan Zuck, 8/9/92 D&DSERVE.DLL Flag used during the creation of the MultiPick ListBox_ Window handle for the MultiPick ListBox Form_Load Set the flag to TRUE to inform Form_Paint to create the MultiPick ListBox Form_Paint Get the Instance handle to MULTIPIK. We need this for the CreateWindow function.e Get the dimensions of the formT Get the dimensions of the Dummy ListBox Calculate the size and placement of the MultiPick ListBox based on the size and placement of the Form and the Dummy ListBox.s Create the MultiPick ListBox lpClassName: we'll use the LISTBOX classd lpWindowName: is irrelevant hereO dwStyle: the MultiPick styleh X, Y, nWidth, nHeight: size and placement of the MultiPick ListBoxL hWndParent: this would be our MULTIPIK hWnd hMenu: would be IDL_MPICK hInstance: we've already determined thatW lpParam: is irrelevant here LISTBOX" OKCancel_Click If the user pressed ENTER or clicked on OK, get the total items picked For the purposes of this demo let's limit the total to 5l Dimension an Array of Integer to hold the indices of the items picked Dimension a String Array to hold the selected items Get the selections from the MultiPick ListBox, and copy themm to the Dish Array removing ASCII 0s.k Prove that it worked Thank you for preferring Trovadore's!" We're done If the user chose Cancel or pressed ESCAPE, exit" Dir1_Change Command1_Click Picture1_MouseDown Path$ = Dir1.Path + "\"